<script setup lang="ts">
import { useDark, useToggle } from "@vueuse/core";
import { Moon, Sunny } from "@element-plus/icons-vue";

const isDark = useDark();
const toggleDark = useToggle(isDark);
defineOptions({
  name: "DrakSwitch",
});
</script>

<template>
  <el-switch :model-value="isDark" :active-icon="Moon" :inactive-icon="Sunny" @click="toggleDark()" />
</template>

<style scoped></style>
